From version 5.0 you have access to the Java Method action within the Rules Design, which can be used for ad-hoc integration with Java APIs. This is the easiest method for Java Integration and should be used before considering Custom Controllers. Please see the Java Method for more details.
It is possible to write Java Controllers on the server to handle client requests and produce responses. This enables Java Programmers to use Java to access other complex server components such and EJBs, whilst retaining the advantages of fast and easy web page design. Please see section on Server Controllers for more information.